Field of the Invention
The present invention generally relates to program execution and more specifically architectural resource management for program execution.
Description of the Related Art
Execution of programs typically requires allocation of processing and storage resources for processing data and storing intermediate results and outputs. Because the architectural resources are limited, the amount of resources allocated to each program is tracked to ensure that the resources in a resource pool are not overallocated. When a program completes execution, the allocated resources are released and returned to the resource pool.
When multi-threaded program execution is supported with context switching, the state data maintained for each execution thread is stored to perform a context switch. The memory required to store the state data is an additional resource that must also be allocated to ensure that the state data can be stored.
Accordingly, what is needed in the art is a system and method for improved allocation and release of resources during multi-threaded execution.